<?php

class Zend_View_Helper_Notes extends Zend_View_Helper_Abstract
{
    public function notes()
    {
        $this->view->notes = $this->_getNotes();
        return $this->view->render('notes.phtml');
    }

    protected function _getNotes()
    {
        $mapper = new Application_Model_Mapper(new Application_Model_DbTable_Notes(), new Application_Model_Note());
        $notes = $mapper->fetchAll();
        shuffle($notes);
        return $notes;
    }
}